package com.han.bom;

import java.util.ArrayList;

/**
 * An extension of the question. Represents a multiple choice question.
 * 
 * @author Nicol Angelo A. Santos
 * @version 1.0
 * @since JDK 1.7
 * @see Question
 */

public class MultipleChoice extends Question {
	
	

	/**
	 * Default Constructor
	 * 
	 * Increments the amount of questions present in the exam, and sets the ID for the question.
	 * Initializes the choices to null because the teller should be the one to give out the choices
	 * for the question. Aside from the choices, it also initializes the Answer and question to empty string;
	 * 
	 */
	public MultipleChoice() {
		super();
		setTotalQuestions(getTotalQuestions()+1);
		this.setQuestionID("Q"+getTotalQuestions()+"MC");
		this.setAnswer("");
		this.setChoices(new ArrayList<String>());
		this.setQuestion("");
	}
	/**
	 * Constructor that increments the amount of questions present in the exam, and sets the ID for the question.
	 * Initializes the answer, question and list of choices through the given parameters
	 * of the constructor.
	 * 
	 * @param question
	 * @param answer
	 * @param choices
	 */
	public MultipleChoice(String question, String answer, ArrayList <String> choices){
		this();
		this.setAnswer(answer);
		this.setQuestion(question);
		this.setChoices(choices);
	}
}
